config-opts: >
--prefix=/usr
--libdir=/usr/lib64
- --enable-installed-tests
+ --enable-installed-tests=exclusive
--enable-gtk-doc
+# The g-d-t-r timeout is for test-pull-many.sh; if tweaking this,
+# also be sure to change the other cases below
tests:
- make syntax-check
- ./tests/ci-commitmessage-submodules.sh
- make check
- - gnome-desktop-testing-runner -p 0 ostree
+ - /bin/sh -c 'gnome-desktop-testing-runner -p 0 --timeout $((10 * 60)) libostree/'
timeout: 30m
config-opts: >
--prefix=/usr
--libdir=/usr/lib64
- --enable-installed-tests
--enable-gtk-doc
--enable-rust
config-opts: >
--prefix=/usr
--libdir=/usr/lib64
- --enable-installed-tests
+ --enable-installed-tests=exclusive
--enable-gtk-doc
--with-curl
--with-openssl
tests:
- make check
- - gnome-desktop-testing-runner -p 0 ostree
+ - /bin/sh -c 'gnome-desktop-testing-runner -p 0 --timeout $((10 * 60)) libostree/'
artifacts:
- test-suite.log
uninstalled_test_data = tests/ostree-symlink-stamp tests/ostree-prepare-root-symlink-stamp \
tests/ostree-remount-symlink-stamp tests/rofiles-fuse-symlink-stamp
-dist_uninstalled_test_scripts = tests/test-symbols.sh
-
-dist_test_scripts = \
+dist_uninstalled_test_scripts = tests/test-symbols.sh tests/coccinelle.sh
+
+# This logic implements ENABLE_INSTALLED_TESTS_EXCLUSIVE; see below.
+# The goal here if installed tests are enabled, we explicitly make the
+# tests *only* run installed, to avoid having to run them twice in CI.
+# This overrides the glib-tap.mk emphasis on doing both, if we'd
+# used e.g. `dist_test_scripts`.
+dist_test_scripts = $(NULL)
+test_programs = $(NULL)
+_installed_or_uninstalled_test_scripts = \
tests/test-basic.sh \
tests/test-basic-user.sh \
tests/test-basic-user-only.sh \
tests/test-pull-contenturl.sh \
tests/test-pull-mirrorlist.sh \
tests/test-summary-view.sh \
- tests/coccinelle.sh \
$(NULL)
if BUILDOPT_FUSE
-dist_test_scripts += tests/test-rofiles-fuse.sh
+_installed_or_uninstalled_test_scripts += tests/test-rofiles-fuse.sh
else
EXTRA_DIST += tests/test-rofiles-fuse.sh
endif
if USE_LIBSOUP
-dist_test_scripts += tests/test-remote-cookies.sh
+_installed_or_uninstalled_test_scripts += tests/test-remote-cookies.sh
endif
-# These call into gjs scripts
+# These call into gjs scripts
js_tests = tests/test-corruption.sh tests/test-pull-corruption.sh
if BUILDOPT_GJS
-dist_test_scripts += $(js_tests)
+_installed_or_uninstalled_test_scripts += $(js_tests)
else
EXTRA_DIST += $(js_tests)
endif
libreaddir_rand_la_LDFLAGS += -rpath $(abs_builddir)
endif
-test_programs = tests/test-varint tests/test-ot-unix-utils tests/test-bsdiff tests/test-mutable-tree \
+_installed_or_uninstalled_test_programs = tests/test-varint tests/test-ot-unix-utils tests/test-bsdiff tests/test-mutable-tree \
tests/test-keyfile-utils tests/test-ot-opt-utils tests/test-ot-tool-util \
tests/test-gpg-verify-result tests/test-checksum tests/test-lzma tests/test-rollsum \
tests/test-basic-c tests/test-sysroot-c tests/test-pull-c
noinst_PROGRAMS += tests/test-rollsum-cli
if USE_LIBARCHIVE
-test_programs += tests/test-libarchive-import
+_installed_or_uninstalled_test_programs += tests/test-libarchive-import
endif
common_tests_cflags = $(ostree_bin_shared_cflags) $(OT_INTERNAL_GIO_UNIX_CFLAGS) -I$(srcdir)/libglnx
ln -sf "$${real_bin}" tests/$*; \
touch $@
+# See above comment on binding the tests to be either installed or not.
+if ENABLE_INSTALLED_TESTS_EXCLUSIVE
+dist_installed_test_scripts = $(_installed_or_uninstalled_test_scripts)
+installed_test_programs = $(_installed_or_uninstalled_test_programs)
+check-local:
+ echo "NOTE: Exclusive installed tests are enabled; to run them, make install, then: gnome-desktop-testing-runner -p 0 libostree/"
+else
+dist_test_scripts += $(_installed_or_uninstalled_test_scripts)
+test_programs += $(_installed_or_uninstalled_test_programs)
+endif
+
# Unfortunately the glib test data APIs don't actually handle
# non-recursive Automake, so we change our code to canonically look
# for tests/ which is just a symlink when installed.
dnl GLIB_TESTS
-dnl
+dnl NOTE: this file has been modified from upstream glib; see
+dnl https://github.com/ostreedev/ostree/pull/837
AC_DEFUN([GLIB_TESTS],
[
AC_ARG_ENABLE(installed-tests,
AS_HELP_STRING([--enable-installed-tests],
[Enable installation of some test cases]),
- [case ${enableval} in
+ [enable_installed_tests=${enableval};
+ case ${enableval} in
yes) ENABLE_INSTALLED_TESTS="1" ;;
+ exclusive) ENABLE_INSTALLED_TESTS="1"; ENABLE_INSTALLED_TESTS_EXCLUSIVE=1 ;;
no) ENABLE_INSTALLED_TESTS="" ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-installed-tests]) ;;
esac])
AM_CONDITIONAL([ENABLE_INSTALLED_TESTS], test "$ENABLE_INSTALLED_TESTS" = "1")
+ AM_CONDITIONAL([ENABLE_INSTALLED_TESTS_EXCLUSIVE], test "$ENABLE_INSTALLED_TESTS_EXCLUSIVE" = "1")
AC_ARG_ENABLE(always-build-tests,
AS_HELP_STRING([--enable-always-build-tests],
[Enable always building tests during 'make all']),